<?php

namespace App\Libraries\Common;

trait ResultHelper
{
    public function SuccessResult($message, $data)
    {
        return array(
            'flag' => true,
            'status' => 'success',
            'message' => $message,
            'data' => $data,
        );
    }

    public function FailResult($message, $exception)
    {
        return array(
            'flag' => false,
            'status' => 'failed',
            'exception' => $exception,
            'message' => $message,
        );
    }
}
